home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / knowhow4 / error.cpp < prev    next >
C/C++ Source or Header  |  1994-10-10  |  866b  |  35 lines

  1. #include "error.h"
  2. #include "blkmenu.h"
  3. #include "button.h"
  4.  
  5.  
  6. int error_report(char* report)
  7.     {
  8.     Window* w = new Window(rect(10, 5, 46, 16),    "error.pcy");
  9.     Button* button = new Button(rect(11, 6, 45, 15),
  10.     report, NO_BORDER);
  11.  
  12.     int bak = pColorSet->colors.BAK_COLOR;
  13.     int attr = pColorSet->colors.ATTR_COLOR;
  14.  
  15.     pColorSet->colors.BAK_COLOR = BLUE;
  16.     pColorSet->colors.ATTR_COLOR = LIGHTRED;
  17.  
  18.     w->show_window();           // window - the "dummy" way to hide button
  19.     button->show();      // button
  20.  
  21.     pColorSet->colors.BAK_COLOR = bak;
  22.     pColorSet->colors.ATTR_COLOR = attr;
  23.  
  24.     e = getevent(KEYEVENT | MOUSEEVENT);
  25.     e.what = KEYEVENT;
  26.     e.key = EVENT_RETURN;
  27.     global_num = 1;
  28.     global_i[0] = AC_OK;
  29.  
  30.     w->hide();
  31.     delete button;
  32.     delete w;
  33.     return 1;
  34.     }
  35. /////////////////////////